#!/bin/bash

docker stop mail
docker rm mail

docker run --name "mail" \
-p 25:25 -p 8888:80 \
-e "HTTPS=OFF" \
-e "DISABLE_CLAMAV=TRUE" \
-p 110:110 -p 143:143 -p 465:465 \
-p 587:587 -p 993:993 -p 995:995 \
-v /etc/localtime:/etc/localtime:ro -v \
/home/data:/data \
-h "mail.xxx.com" \
--restart=always -d -t analogic/poste.io


iptables -D  INPUT -p tcp -m multiport --dport  25,110,143,465,993,587,995,1022,55557  -j ACCEPT
iptables -I INPUT -p tcp -m multiport --dport  25,110,143,465,993,587,995,1022,55557  -j ACCEPT
iptables-save